import 'package:boss/textStyle/text_style.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

class CalendarHeader extends StatelessWidget {
  final List<String> titles = ['日', '一', '二', '三', '四', '五', '六'];

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(
        horizontal: 32.w,
      ),
      child: GridView.builder(
        shrinkWrap: true,
        physics: NeverScrollableScrollPhysics(),
        gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
          crossAxisCount: 7,
          mainAxisSpacing: 40.w,
        ),
        padding: EdgeInsets.all(0),
        itemBuilder: (context, index) {
          var text = titles[index];
          var style = index == 0 || index == 6 ? TextStyleConstant().origin_28 : TextStyleConstant().normal_4_28;

          return Container(
            alignment: Alignment.center,
            child: Text(
              text,
              style: style,
            ),
          );
        },
        itemCount: titles.length,
      ),
    );
  }
}
